local qunxian3__baishoukaiduo_paoleibagua = fk.CreateSkill {

  name = "qunxian3__baishoukaiduo_paoleibagua",

  tags = {},

}

Fk:loadTranslationTable {
  ["qunxian3__baishoukaiduo_paoleibagua"] = "咆雷八卦",
  [":qunxian3__baishoukaiduo_paoleibagua"] = [[出牌阶段限一次，你可弃置一张牌横置任意名角色并对一名角色造成其当前体力值的伤害。]],
  ['#qunxian3__baishoukaiduo_paoleibagua'] = '咆雷八卦：你可弃置一张牌横置任意名角色',
  ['#qunxian3__baishoukaiduo_paoleibagua-choose_player'] = '咆雷八卦：你可对一名角色造成其当前体力值的伤害',
  ["$qunxian3__baishoukaiduo_paoleibagua"] = "咆雷八卦",
}

qunxian3__baishoukaiduo_paoleibagua:addEffect("active", {
  anim_type = "offensive",
  prompt = "#qunxian3__baishoukaiduo_paoleibagua",
  target_filter = Util.TrueFunc,
  min_target_num = 1,
  can_use = function(self, player)
    return player:usedSkillTimes("qunxian3__baishoukaiduo_paoleibagua", Player.HistoryPhase) == 0 and not player:isNude()
  end,
  card_num = 1,
  card_filter = function(self, player, to_select, selected, selected_targets)
    return #selected == 0
  end,
  on_use = function(self, room, skillUseEvent)
    local player = skillUseEvent.from
    local targets = skillUseEvent.tos
    if #targets == 0 then return end
    for index, target in ipairs(targets) do
      target:setChainState(true)
    end
    local target_p = room:askToChoosePlayers(player, {
      targets = room.alive_players,
      min_num = 1,
      max_num = 1,
      cancelable = true,
      skill_name = "qunxian3__baishoukaiduo_paoleibagua",
      prompt = "#qunxian3__baishoukaiduo_paoleibagua-choose_player"
    })
    if #target_p == 0 then return end
    room:damage({
      from = player,
      to = target_p[1],
      damage = target_p[1].hp,
      skillName = "qunxian3__baishoukaiduo_paoleibagua"
    })
  end
})


return qunxian3__baishoukaiduo_paoleibagua
